<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<c:set var="currentMenu" value="home" />
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="" />
<title>JK Holdings</title>
<script src="/js/jquery-1.6.4.js"></script>
<link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
<script type="text/javascript">
$(document).ready(function(){
	
});
</script>
</head>
<body id="top">
	<!-- 공통 헤더 시작 -->
	<%@ include file="/WEB-INF/head.jsp" %>
	<!-- 공통 헤더 끝 -->
	
	<!-- 메인 네비게이션 시작  -->
	<%@ include file="/WEB-INF/navigation.jsp" %>
	<!-- 메인 네비게이션 끝  -->

	<div id="content-wrapper">
		<div class="center-wrapper">

			<div class="content" id="content-two-columns">

				<div id="main-wrapper">
					<div id="main">
						<img src="/img/intro.png" width="640" />
						
						<div class="half-post">
							<div class="half-post-title">
								<h3>질문/답변 게시판</h3>
							</div>

							<div class="half-post-body">
								<table>
									<thead>
										<tr>
											<th>번호</th>
											<th>제목</th>
											<th>작성일</th>
											<th>작성자</th>
										</tr>
									</thead>

									<tbody>
										<c:choose>
											<c:when test="${qnaList != null && fn:length(qnaList) != 0 }">
												<c:forEach var="board" items="${qnaList}">
													<tr>
														<td>${board.boardId}</td>
														<td><a href="/board/view/${board.boardType}/${board.boardId}.do">${board.boardTitle}</a></td>
														<td>${fn:substring(board.registrationDay, 0, 10)}</td>
														<td>${board.boardWriter}</td>
													</tr>
												</c:forEach>
											</c:when>
											<c:otherwise>
												<tr>
													<td colspan="4" style="text-align:center"> 등록 된 게시물이 없습니다. </td>
												</tr>
											</c:otherwise>
										</c:choose>
									</tbody>
								</table>
								<!-- <button type="button" class="list"><span>목록</span></button> -->
							</div>
						</div>
						
						<div class="half-post">
							<div class="half-post-title">
								<h3>공지 사항 게시판</h3>
							</div>

							<div class="half-post-body">
								<table>
									<thead>
										<tr>
											<th>번호</th>
											<th>제목</th>
											<th>작성일</th>
											<th>작성자</th>
										</tr>
									</thead>

									<tbody>
										<c:choose>
											<c:when test="${noticeList != null && fn:length(noticeList) != 0 }">
												<c:forEach var="board" items="${noticeList}">
													<tr>
														<td>${board.boardId}</td>
														<td><a href="/board/view/${board.boardType}/${board.boardId}.do">${board.boardTitle}</a></td>
														<td>${board.registrationDay}</td>
														<td>${board.boardWriter}</td>
													</tr>
												</c:forEach>
											</c:when>
											<c:otherwise>
												<tr>
													<td colspan="4" style="text-align:center"> 등록 된 게시물이 없습니다. </td>
												</tr>
											</c:otherwise>
										</c:choose>
									</tbody>
								</table>
								<!-- <button type="button" class="list"><span>목록</span></button> -->
							</div>
						</div>
						
					</div>
				</div>

				<div id="sidebar-wrapper">
					<div id="sidebar">

						<!-- 카테고리 box 시작 -->
						<%@ include file="/WEB-INF/category.jsp" %>
						<!-- 카테고리 box 끝 -->

						<div class="box nobborder">

							<div class="box-title">About</div>

							<div class="box-content">
								<p>뭔가 About 설명이 들어가야할 영역</p>
							</div>

						</div>

					</div>
				</div>

				<div class="clearer">&nbsp;</div>

			</div>

		</div>
	</div>

	<!-- bottom 시작 -->
	<%@ include file="/WEB-INF/bottom.jsp" %>
	<!-- bottom 끝 -->

</body>
</html>